﻿using HDS.Common.Helper;
using System;
using System.Collections.Generic;
using System.Text;

namespace HDS.SupplierApi.Core.Entity
{
    public class RoomGuest
    {
        /// <summary>
        /// 默认1间房2成人
        /// </summary>
        public RoomGuest()
        {
            Count = 1;
            Adults = 2;
            ChildrenAges = null;
            Nationality = "CN";
        }

        /// <summary>
        /// 房间数
        /// </summary>
        public int Count { get; set; }

        /// <summary>
        /// 入住成人数/每间房
        /// </summary>
        public int Adults { get; set; }

        /// <summary>
        /// 入住儿童数/每间房
        /// </summary>
        public int Children
        {
            get
            {
                if (ChildrenAges.IsEmpty())
                    return 0;
                else
                    return ChildrenAges.Length;
            }
        }

        /// <summary>
        /// 儿童年龄/每间房
        /// </summary>
        public int[] ChildrenAges { get; set; }

        /// <summary>
        /// 国籍
        /// </summary>
        public string Nationality { get; set; }

        /// <summary>
        /// 入住客人姓名(按房间数)
        /// </summary>
        public List<List<GuestName>> GuestNames { get; set; }
    }
}
